<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>index</title>

    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
            box-sizing: border-box;
        }

        :root {
            --fontColor: #d82019;
        }

        .clearfix::after {
            content: '';
            display: table;
            clear: both;
        }

        .wfull {
            width: 100%;
        }

        .obc {
            object-fit: cover;
        }

        .hfull {
            height: 100%;
        }
    </style>

</head>
<body>


<style>
    .root {
        width: 80%;
        margin: auto;
    }
</style>
<div class="root">


    <img th:src="@{/img/TEST.jpg}" style="width:123px; height:123px;  "/>


    <h1>首页 index </h1>

    <h2><a target="_blank" th:href="@{/admin/add}">Add</a></h2>  <br>
    <h2><a th:href="@{/search}">search</a></h2>   <br>
    <h2><a target="_blank" th:href="@{/insert_db}"> insert db </a></h2>

    <br><br>
    <h2  id="localStorage_length"></h2>


</div>
</body>
<script th:inline="javascript">

    // console.log([[${dataaaaa}]]);

    // completion_words
    var completion_words = [[${completion_words}]];
    console.log(completion_words);

    for (const word of completion_words) {
        localStorage.setItem(word, word);
    }

    document.getElementById("localStorage_length").innerText = "关键词数量 : " + localStorage.length;


</script>
</html>

